import React from "react";
import { useSelector } from "react-redux";

const Home = () => {
  // 获取仓库数据
  const count = useSelector(state => state.counter.count)
 // 获取仓库数据
  const list = useSelector(state => state.person.list)
  return <div>
    <h1>Home</h1>
    <h3>count: { count }</h3>

    <ul>
      {
        list.map((v, i) => {
          return (
            <div key={i}>
              {v}
            </div>
          )
        })
      }
    </ul>
  </div>;
};

export default Home;
